Skip to content

Conversation

@GziXnine
Copy link
Contributor

@GziXnine GziXnine commented Feb 3, 2026

Summary of Changes

Removed 11 duplicate files, For existing contributors working on removed files:

  • PerfectBinarySearch → Use IterativeBinarySearch
  • SortOrderAgnosticBinarySearch → Use OrderAgnosticBinarySearch
  • strings/LongestPalindromicSubstring → Use dynamicprogramming/LongestPalindromicSubstring
  • strings/ValidParentheses → Use stacks/ValidParentheses
  • others/cn/HammingDistance → Use strings/HammingDistance or bitmanipulation/HammingDistance

Updated documentation:

  • DIRECTORY.md - Removed entries for deleted files and cleaned up empty folder references

Closes #7253


  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new algorithms include a corresponding test class that validates their functionality.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Removed the following duplicate implementations:
- searches/PerfectBinarySearch.java (duplicate of IterativeBinarySearch)
- searches/SortOrderAgnosticBinarySearch.java (duplicate of OrderAgnosticBinarySearch)
- strings/LongestPalindromicSubstring.java (duplicate of dynamicprogramming version)
- strings/ValidParentheses.java (duplicate of stacks version)
- others/cn/HammingDistance.java (duplicate - strings version handles text)
- others/NewManShanksPrimeTest.java (orphan test in wrong package)

Updated DIRECTORY.md to reflect the changes.

Fixes TheAlgorithms#7253
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.34%. Comparing base (c6703d3) to head (ec59b9a).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7256      +/-   ##
============================================
- Coverage     79.39%   79.34%   -0.05%     
+ Complexity     7017     6980      -37     
============================================
  Files           785      780       -5     
  Lines         22982    22917      -65     
  Branches       4520     4501      -19     
============================================
- Hits          18246    18184      -62     
+ Misses         4016     4014       -2     
+ Partials        720      719       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenizAltunkapan DenizAltunkapan merged commit 8e30bcb into TheAlgorithms:master Feb 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up duplicate algorithm implementations in Java

3 participants